﻿using System;
using System.Collections.Generic;
using System.Web.Script.Serialization;
using System.Web.Script.Services;
using System.Web.Services;
using Newtonsoft.Json;

public partial class Account_WatchList : System.Web.UI.Page
{
    static JsonParser jsonParser;
    static User user;

    protected void Page_Load(object sender, EventArgs e)
    {
        user = (User)Session["UserSession"];
    }

    [WebMethod]
    [ScriptMethod]
    public static string getAllPlayers()
    {
        var jsonSerialiser = new JavaScriptSerializer();
        string result = jsonSerialiser.Serialize(new JsonParser().getAllPlayers());
        return result;
    }

    [WebMethod]
    [ScriptMethod]
    public static string getWatchList()
    {
        if (user != null)
        {
            var jsonSerialiser = new JavaScriptSerializer();
            string result = jsonSerialiser.Serialize(new JsonParser().getAllPlayers());
            
        }
        return "";
    }
}